// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue';
import App from './App';
import router from './router'
Vue.prototype.$axios=axios
import axios from 'axios'
import qs from 'qs'
Vue.prototype.$qs=qs
import global_ from './common/js/Global'//引用文件
Vue.prototype.GLOBAL = global_
axios.defaults.withCredentials=true;

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})

var urlV = window.location.href
var urls = urlV.split('#')
var param = urls[1].replace(/\/nineteenth/, '')
if(urls[1].indexOf('nineteenth')>0&&urls[1].indexOf('?')==-1){
  console.log(param);
  window.location.href = '/#/nineteenth?'+param;
}


Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  axios:axios,
  components: { App },
  template: '<App/>'
})
